Removing $_SESSION['layout']['action'] globally from all users!

Posted by sologhost on Stack Overflow See other posts from Stack Overflow or by sologhost
Published on 2010-04-04T19:48:08Z Indexed on 2010/04/04 19:53 UTC
Read the original article Hit count: 332

Ok, I am storing a session variable like so to load up users layouts faster if it's set instead of calling the database. But since the layout can be changed via the Administrator, I'd like to be able to globally remove all sessions where $_SESSION['layout']['action'] is set for all users.

$_SESSION['layout']['action'] = array(a ton of indexes and mulit-dimensional arrays);

Now, I know it's being stored into my database sessions table, there's a column for session_id, last_update, and data. So, question I have is how to remove that session array key ['action'] from all users.

Using

$_SESSION = array();
session_destroy();

Does not work. Basically, session_start() is being loaded on every page load, so I just want to remove all ['action'] keys from ['layout'].

Is this possible to do? Thanks

© Stack Overflow or respective owner

Related posts about php

Related posts about sessions